$(function () {
    // console.log(allData.shangpin);
    $.each(allData.shangpin, function (i, v) {
        // console.log(1);
        // console.log(v.img[0]);
        // console.log($('.items-small'));

        var str1 = '';

        str1 = `
                    <li class="gl-h-item">
                            <div class="gl-i-wrap">
                                <div class="col col-1">
                                    <div class="p-img">
                                        <a href="javascript:void(0)" target="_blank"><img src="${v.img[0]}">
                                                                        </a>
                                    </div>
                                    <div class="p-right">
                                        <div class="p-name">
                                            <a href="https://x.dscmall.cn/goods-644.html" title="${v.title}" target="_blank">
                                                                                                                ${v.title}
                                            </a>
                                        </div>
                                        <div class="p-lie">
                                            <div class="p-num">销量：${v.xiaoliang}</div>
                                            <div class="p-comm">评价：${v.pingjia}
        </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col col-2">
                                    <div class="p-store">


                                    <a href="javascript:;" title="${v.dianming}" class="store">${v.dianming}</a>


                                    <a id="IM"  href="javascript:void(0);" ru_id="0" goods_id="644" class="p-kefu"><i class="iconfont icon-kefu"></i></a>


                                    </div>
                                </div>
                                <div class="col col-3">
                                    <div class="p-price">
                                        <div class="shop-price">


                                                ¥${v.jiage}


                                        </div>
                                        <div class="original-price">¥${v.yuanjia}</div>
                                    </div>
                                </div>
                                <div class="col col-4">
                                    <div class="p-operate">
                                        <a href="javascript:void(0);" id="compareLink">
                                        <input id="duibi_644" type="checkbox" name="duibi" class="ui-checkbox" >
                                        <label class="ui-label" for="duibi_644">对比</label>
                                    </a>
                                    <a href="javascript:void(0);" class="choose-btn-coll
        "><span class="iconfont icon-ban">收藏</a>




                                        <a href="javascript:void(0);"  data-dialog="addCart_dialog" data-id="" data-divid="addCartLog" data-url="" data-title="请选择属性" class="addcart">
                                        <span class="iconfont icon-gouwuche
                                        "></span></i>加入购物车
                                        </a>




                                    </div>
                                </div>
                            </div>
                        </li>
                    `;

        $('.items-small').append(str1);


    })
})